//
//  H264Encoder.h
//  VedioEncoder
//
//  Created by mac on 2017/6/21.
//  Copyright © 2017年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <VideoToolbox/VideoToolbox.h>

@protocol H264EncoderDelegate <NSObject>

@required

- (void)getSpsPps:(NSData *)sps pps:(NSData *)pps;
- (void)getEncodeData:(NSData *)data isKeyFrame:(BOOL)isKeyFrame frameCount:(long long)frameCount;

@end
@interface H264Encoder : NSObject
+(H264Encoder *)defaultEncoder;
- (void)initConfiguration;

- (void)encoderSampleBuffer:(CMSampleBufferRef)buffer;
- (void)setDelegate:(id<H264EncoderDelegate>)delegate;
@end
